/*
 * Copyright (c) 2025 Huawei Technologies Co., Ltd.
 * openUBMC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *         http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#include "discovery/object_group.h"

namespace devmon {

void object_group::init(std::string position, uint64_t online_timestamp, uint8_t slot) {
    m_object_group_interface.init(position, online_timestamp, slot);
}

void object_group_root::create_object(mc::engine::service* service) {
    auto object_group_root_ptr = mc::make_shared<object_group_root>();
    object_group_root_ptr->set_object_name("ObjectGroupRoot");
    object_group_root_ptr->set_object_path("/bmc/dev/ObjectGroup");
    service->register_object(object_group_root_ptr);
}

} // namespace devmon

MC_REFLECT(devmon::object_group, ((m_object_group_interface, "ObjectGroup")))
MC_REFLECT(devmon::object_group_root, ())
